import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/manager/site-config/list/',
    method: 'get',
    params: query
  })
}

export function delManger(manger_id) {
  return request({
    url: '/customer/delManger/' + manger_id,
    method: 'get'
  })
}

export function delCustomer(customer_id) {
  return request({
    url: '/manager/site-config/delete/'+customer_id+'/' ,
    method: 'get'
  })
}

export function fetchcustomer(id) {
  return request({
    url: '/customer/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/customer/pv',
    method: 'get',
    params: { pv }
  })
}

export function createcustomer(data) {
  return request({
    url: '/manager/site-config/add/',
    method: 'post',
    data
  })
}

export function updatecustomer(id,data) {
  return request({
    url: '/manager/site-config/edit/'+id+'/',
    method: 'post',
    data
  })
}

export function getAllCustomer() {
  return request({
    url: '/customer/getAll',
    method: 'post'
  })
}

export function getAllTags() {
  return request({
    url: '/customer/getAllTags',
    method: 'get'
  })
}

export function deletetag(tag_id) {
  return request({
    url: '/customer/deleteTag/' + tag_id,
    method: 'get'
  })
}

export function customerSync(data) {
  return request({
    url: '/sync/customer',
    method: 'post',
    data
  })
}

export function getAllRemarks() {
  return request({
    url: '/customer/getAllRemarks',
    method: 'get'
  })
}
